Skip to main content

🎨 Change App Theme

Each app keeps its theme colours in one file, lib/ui/styles/colors.dart. Change a colour there and every screen that uses it follows, including the menu icons and the illustrations.


🔄 Steps to Change the Colours​

1️⃣ Open the Colours File​

Go to lib/ui/styles/colors.dart in the app you want to change.

colors.dart: each colour and its default value

2️⃣ Replace the Colour Values​

Each colour has a defaultValue. Replace only that value:

lib/ui/styles/colors.dart
const Color primaryColor = Color(
int.fromEnvironment('SCHOOL_COLOR_PRIMARY', defaultValue: 0xff22577A));

A colour is written as 0xff followed by its six-digit hex code:

Your colourWrite it as
#22577A0xff22577A
#C2185B0xffC2185B
Change only the defaultValue

Keep the names in quotes, such as 'SCHOOL_COLOR_PRIMARY', exactly as they are. The Dedicated School Mobile App add-on uses them to give each school its own colours.

3️⃣ Run the App Again​

Stop the app and run it again. The colours are built into the app, so a hot reload does not show them.

flutter run

🎨 What Each Colour Controls​

ColourDefaultWhere you see it
primaryColor#22577AThe main brand colour: top bars, buttons, menu icons and illustrations.
secondaryColor#212121Main text, titles and the bottom navigation icons.
pageBackgroundColor#FFFFFFThe background of every screen.
backgroundColor#F6F6F6Cards, panels and input fields.
tertiaryColor#EBEEF3Borders and light fills.
errorColor#FF6769Error messages and failed states.
onBackgroundColor#484848Secondary text and divider lines.
onPrimaryColor#3BCC97The accent: the selected bottom navigation icon and the shapes on the login screens.
onSecondaryColor#57CC99Light accent tints.
splashBackgroundColor#FFFFFFThe background of the splash screen.

Icons and Illustrations Follow the Primary Colour​

You do not need to recolour any image. The menu icons, their tinted tiles and the illustrations on the empty, error and maintenance screens are painted in your primary colour when the app runs:

The same icons and illustrations with two primary colours


📌 Colours Set Outside This File​

WhatWhere to change it
Notification colour (Android)notification_color in android/app/src/main/res/values/colors.xml. Set it to your primary colour.
App iconSee Change App Logo & Assets.
Launch screenThe first screen, shown before the app's own splash: launch_background.xml on Android and LaunchScreen.storyboard on iOS. In the Student/Parent app, keep its background the same as splashBackgroundColor, or the screen flashes between the two.

🏫 Building Apps for Several Schools?​

With the Dedicated School Mobile App add-on, each school sets its own colours in the builder and no file is edited. The values in colors.dart are the defaults that a school inherits for any colour it leaves empty. See Add a School.


📝 Notes​

  • Pick a primary colour dark enough for white text. Buttons and top bars put white text on it.
  • Keep the accent different from the primary. In the Student/Parent app, onPrimaryColor marks the selected tab, so it has to stand out.
  • Change both apps. The Student/Parent app and the Staff/Teacher app each have their own colors.dart.
  • Check the real screens. After changing colours, open the login screen, the home screen, a list and an error screen before you publish.